<?php
declare (strict_types = 1);

namespace app\admin\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class GoodsPropValue extends Model
{
    //
    protected $pk = 'vid';
    public static function getPropValue($data=[])
    {
        $prop_value_list = self::field('vid,prop_value')
            ->where('status',1)
            ->order('sort_order')
            ->select();

        $prop_value_arr = [];
        foreach ($prop_value_list as $value){
            $prop_value_arr[$value['vid']] = $value['prop_value'];
        }

        return [
            'prop_value_list' => $prop_value_list,
            'prop_value_arr' => $prop_value_arr,
        ];
    }
}
